<{extend name="public/base"}>
<{block name="head_source"}>
<style type="text/css">
    .navigation-intend td:nth-child(1){
        padding-left:20px;
    }
</style>
<{/block}>
<{block name="content"}>

    <div class="box">
        <div class="box-header">
            <h3 class="box-title"><{$title}></h3>
        </div>
        <!-- /.box-header -->
        <div class="box-body">

            <div class="row">
                <div class="col-sm-6">
                    <a class="btn  btn-primary" href="<{:url('admin/navigation/add')}>">
                        新增
                    </a>
                </div>

            </div>

            <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                    <{foreach name="column" id="item" key="k"}>
                    <th><{$item}></th>
                    <{/foreach}>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <{volist name="model" id="item"}>
                <tr>
                    <{foreach name="column" id="i" key="k"}>
                    <td><{$item[$k]}></td>
                    <{/foreach}>
                    <td>
                        <a href="<{:url('admin/navigation/edit',array('id'=>$item['id']))}>" class="btn btn-primary btn-sm">编辑</a>
                        <a href="<{:url('admin/navigation/delete',array('id'=>$item['id']))}>" class="btn btn-danger btn-sm">删除</a>
                    </td>
                </tr>
                    <{if condition="isset($item['sub'])"}>
                    <{volist name="item.sub" id="item2"}>
                    <tr class="navigation-intend">
                        <{foreach name="column" id="ii" key="kk"}>
                        <td><{$item2[$kk]}></td>
                        <{/foreach}>
                        <td>
                            <a href="<{:url('admin/navigation/edit',array('id'=>$item2['id']))}>" class="btn btn-primary btn-sm">编辑</a>
                            <a href="<{:url('admin/navigation/delete',array('id'=>$item2['id']))}>" class="btn btn-danger btn-sm">删除</a>
                        </td>
                    </tr>
                    <{/volist}>
                    <{/if}>
                <{/volist}>

                </tbody>
                <tfoot>
                <tr>
                    <{foreach name="column" id="item" key="k"}>
                    <th><{$item}></th>
                    <{/foreach}>
                    <th>操作</th>
                </tr>
                </tfoot>
            </table>


        </div>
        <!-- /.box-body -->
    </div>

<{/block}>
